//引入二次封装
import request from "@/utils/request"
import type { DeparmentResponseData, HospitalDetail } from "./type"
//枚举请求地址
enum API{
    HOSPITALDETAL_URL = '/hosp/hospital/',
    //获取某一个医院的科室数据
    HOSPITALDEPARMENT_URL = '/hosp/hospital/department/',
    //获取验证码接口
    GETUSERCODE_URL = '/sms/send/' 
}
//获取医院详情接口
export const reqHospitalDetail = (hoscode:string)=>request.get<any,HospitalDetail>(API.HOSPITALDETAL_URL+hoscode)
//获取医院科室接口
export const reqHospitalDeparment = (hoscode:string) => request.get<any,DeparmentResponseData>(API.HOSPITALDEPARMENT_URL+hoscode)
//获取验证码
export const reqCode = (phone:string) =>request.get(API.GETUSERCODE_URL+phone)